<%@ page import="com.minxi.web.javabean.Userinfo" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2024-06-19
  Time: 16:28
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<h1>学生信息管理系统</h1>
<% List<Userinfo> userList= (List<Userinfo>) request.getSession().getAttribute("userList");%>
<%String contextPath = request.getContextPath();%>
<table>
    <tr>
        <th>编号</th>
        <th>姓名</th>
        <th>年龄</th>
        <th>性别</th>
        <th>手机号</th>
    </tr>
    <%for (Userinfo userinfo : userList) {%>
    <tr>
        <td><%=userinfo.getId()%>
        </td>
        <td><%=userinfo.getUserName()%>
        </td>
        <td><%=userinfo.getUserAge()%>
        </td>
        <td><%=1 == userinfo.getUserSex() ? "男" : "女"%>
        </td>
        <td><%=userinfo.getUserPhone()%>
        </td>
        <td>
            <a href="<%=contextPath%>/del?id=<%=userinfo.getId()%>">删除</a>
        </td>
    </tr>
    <%}%>


</table>
</body>
</html>
